<#assign basePath=request.contextPath />
<!--左侧导航开始-->
<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <span><img alt="image" width="64" class="img-circle" id="tx" src="${basePath}/img/profile_small.jpg"/></span>
                    <!-- img/profile_small.jpg -->
                    <!-- ${basePath }/user/getTx?id=<@shiro.principal property="userId"/> -->
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear">
                        <span class="block m-t-xs"><strong class="font-bold"><@shiro.principal property="username"/></strong></span>
                        <span class="text-muted text-xs block"><@shiro.principal property="roleNames"/><b class="caret"></b></span>
                        </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a class="J_menuItem" href="${basePath }/user/tx/<@shiro.principal property="userId"/>">修改头像</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element">H+
                </div>
            </li>
            <!-- <li>
                <a href="#">
                    <i class="glyphicon glyphicon-user"></i>
                    <span class="nav-label">会员管理</span>
                    <span class="fa arrow"></span>
                </a>
                <ul class="nav nav-second-level">
                    <li>
                        <a class="J_menuItem" href="member/member-list">会员列表</a>
                    </li>
                </ul>
            </li> -->
            
            <!-- <li>
                <a href="#">
                    <i class="glyphicon glyphicon-lock"></i>
                    <span class="nav-label">权限管理</span>
                    <span class="fa arrow"></span>
                </a>
                <ul class="nav nav-second-level">
                    <li>
                        <a class="J_menuItem" href="user/list">用户管理</a>
                        <a class="J_menuItem" href="role/list">角色管理</a>
                        <a class="J_menuItem" href="permission/list">权限管理</a>
                    </li>
                </ul>
            </li> -->
            
            <#list activeUser.menus as menu>
            	<li>
            		<#if menu.pId == 1>
	                <a href="#">
	                    <i class="${ menu.css }"></i>
	                    <span class="nav-label">${menu.name}</span>
	                    <span class="fa arrow"></span>
	                </a>
	                </#if>
	                <ul class="nav nav-second-level">
	                    <li>
	                        <#list activeUser.menus as cm>
	                        	<#if cm.pId  ==  menu.id>
	                        		<a class="J_menuItem" href="${ cm.link }">${ cm.name }</a>
	                        	</#if>
	                        </#list>
	                    </li>
	                </ul>
	            </li>
            </#list>
            
        </ul>
    </div>
</nav>
<!--左侧导航结束-->